home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.JToolBar;
- import java.awt.Point;
- import java.awt.event.ComponentEvent;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseListener;
- import java.awt.event.MouseMotionListener;
- import java.io.Serializable;
-
- public class BasicToolBarUI$DockingListener implements MouseMotionListener, MouseListener, Serializable {
- // $FF: synthetic field
- BasicToolBarUI this$0;
- protected JToolBar toolBar;
- protected boolean isDragging;
- protected Point origin;
-
- // $FF: synthetic method
- public BasicToolBarUI$DockingListener(BasicToolBarUI this$0, JToolBar t) {
- this.this$0 = this$0;
- this.isDragging = false;
- this.origin = null;
- this.toolBar = t;
- }
-
- public void mouseClicked(MouseEvent e) {
- }
-
- public void mousePressed(MouseEvent e) {
- this.isDragging = false;
- }
-
- public void mouseReleased(MouseEvent e) {
- if (this.isDragging) {
- Point position = e.getPoint();
- if (this.origin == null) {
- this.origin = ((ComponentEvent)e).getComponent().getLocationOnScreen();
- }
-
- this.this$0.floatAt(position, this.origin);
- }
-
- this.origin = null;
- this.isDragging = false;
- }
-
- public void mouseEntered(MouseEvent e) {
- }
-
- public void mouseExited(MouseEvent e) {
- }
-
- public void mouseDragged(MouseEvent e) {
- this.isDragging = true;
- Point position = e.getPoint();
- if (this.origin == null) {
- this.origin = ((ComponentEvent)e).getComponent().getLocationOnScreen();
- }
-
- this.this$0.dragTo(position, this.origin);
- }
-
- public void mouseMoved(MouseEvent e) {
- }
- }
-